package com.zoro.barn.commons.webcommons.webconfig;


import com.zoro.barn.commons.webcommons.feign.BarnRequestEncoder;
import com.zoro.barn.commons.webcommons.feign.BarnResponseEntityDecoder;
import feign.codec.Decoder;
import feign.codec.Encoder;
import org.springframework.context.annotation.Bean;

/**
 * @author zhaoxingwu
 */
public class FeignDecoderConfig {

    @Bean
    public Decoder feignDecoder() {
        return new BarnResponseEntityDecoder();
    }

    @Bean
    public Encoder feignEncoder() {
        return new BarnRequestEncoder(null);
    }
}
